//Revisions number
#define SWHIGH  0
#define SWLOW   7
// mt
#define SWLOWLOW 6

// main.h

#define WITH_TRANSMIT
#define USE_BUFFER2 //use buffer2 of dataflash in order to read, and keep writing data to buffer1

void Initialization(void);
//unsigned char StateMachine(char state, unsigned char stimuli);
//char BootFunc(char input);
void PowerSaveFunc(char input);
void AutoPower(char input);
//char KeyClick(char input);
void Delay(unsigned int millisec);
//char Revision(char input);
void OSCCAL_calibration(void);

#define BOOL    char

#ifndef FALSE
#define FALSE   0
#define TRUE    (!FALSE)
#endif

#ifndef NULL
// mt/ca:
// #define NULL    0
#define NULL ((void *)0)
#endif

#define AUTO    3

// Macro definitions
//mtA - 
// sbi and cbi are not longer supported by the avr-libc
// to avoid version-conflicts the macro-names have been 
// changed to sbiBF/cbiBF "everywhere"
#define sbiBF(port,bit)  (port |= (1<<bit))   //set bit in port
#define cbiBF(port,bit)  (port &= ~(1<<bit))  //clear bit in port
//mtE


#define ST_MAIN		  	1
#define ST_SET_INT		2
#define ST_READ_DATA	3
#define ST_STOP_GO		4
#define ST_TRANSF_PC	5
